package com.xgggh.redpack.ui.redpack.viewbinder;


import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;

import com.xgggh.redpack.R;
import com.xgggh.redpack.base.viewbinder.BaseItemViewBinder;
import com.xgggh.redpack.base.viewbinder.BinderViewHolder;
import com.xgggh.redpack.databinding.ContentOpenRedPackConstraintBinding;
import com.xgggh.redpack.databinding.ContentOpenRedPackItemBinding;
import com.xgggh.redpack.domain.redpack.OpenRedPackConstraint;
import com.xgggh.redpack.domain.redpack.Pack;

/**
 * @title 领取红包的约束条件
 *  时间，地点，人物等
 */
public class OpenRedPackConstraintViewBinder extends BaseItemViewBinder<OpenRedPackConstraint> {

    @NonNull
    @Override
    public int getResId() {
        return R.layout.content_open_red_pack_constraint;
    }


    @Override
    protected void onBindViewHolder(@NonNull BinderViewHolder holder, @NonNull OpenRedPackConstraint item) {
        ContentOpenRedPackConstraintBinding binding= DataBindingUtil.getBinding(holder.itemView);
        binding.setConstraint(item);
    }
}
